FUNCTION

create_account_with_auth

function create_account_with_auth(auth_descriptor: auth_descriptor, account_id: byte_array?): account

Standard way of creating a user account. Account registration strategies call this function.

Can only be called from an operation.

Throws "RESTRICTED MAIN AUTH" if the auth descriptor has expiration rules, i.e. if the rules field is not equivalent to the value of GTV_NULL.

Throws if the auth descriptor is invalid. Common cases include:

  • errors with the args field:
    • some required flags are missing
    • in multi-sig auth descriptors, the required_signatures field:
      • is 0 or less
      • is greater than the number of signers

Parameters

  • auth_descriptor — the main auth descriptor for the account.
  • account_id — optionally, the id for this account.

See Also

© 2024 Chromia